//
//  MPBlueToothManagerEnum.h
//  MPOSDemoProject
//
//  Created by lfy on 2018/6/7.
//  Copyright © 2018年 develop. All rights reserved.
//



#ifndef MPBlueToothCallback_h
#define MPBlueToothCallback_h

#import "MPBlueToothDefine.h"
#import "MPTerminalInfoModel.h"
#import "MPEmvModel.h"
#import "MPPinPadModel.h"
#import "BabyBluetooth.h"

#pragma mark - BluetoothBlock
typedef void(^DiscoverToPeripheralsBlock)(CBCentralManager *central, CBPeripheral *peripheral, NSDictionary *advertisementData, NSNumber *RSSI);
typedef void(^ConnectPeripheralBlock)(CBCentralManager *central, CBPeripheral *peripheral, NSError *error);
typedef void(^DisConnectPeripheralBlock)(CBCentralManager *central, CBPeripheral *peripheral, NSError *error);
typedef void(^DiscoverServerBlock)(CBPeripheral *peripheral, NSError *error);
typedef void(^DiscoverCharacteristicBlock)(CBPeripheral *peripheral, CBService *service, NSError *error);

#pragma mark - CardRead
/// 操作回调Block
typedef void(^OnCardReadListener)(OnOperateStatus);

#pragma mark - DisplayManager
typedef void(^OnDisplayQRCodeListener)(OprResEnum status);
typedef void(^OnIconInfoListener)(OnOperateStatus status,NSString *version, int iconCount);

#pragma mark - EmvHandle
typedef void(^onLoadEmvAttributeSetListener)(OprResEnum status);
typedef void(^onLoadEmvAttributeGetListener)(NSData* data,OprResEnum status);
typedef void(^OnEmvProcessSuccessListener)(MPEmvCardInfoModel* cardInfo);
typedef void(^OnEmvProcessFailListener)(MPEmvCardInfoModel* cardInfo);
typedef void(^OnCardWritebackListener)(MPICCardWriteResultModel* backData);

#pragma mark - PinPadManager
typedef void(^OnPinPadUpdateListener)(UpdateKeyResultEnum res);
typedef void(^onLoadEmvAttributeSetListener)(OprResEnum status);
typedef void(^onLoadEmvAttributeSetListener)(OprResEnum status);
typedef void(^onLoadEmvAttributeSetListener)(OprResEnum status);
typedef void(^onLoadEmvAttributeSetListener)(OprResEnum status);
typedef void(^OnCalculatMACSuccessListener)(MPCalculationMacModel *model);
typedef void(^OnCalculatMACFailListener)(EncryptionFailEnum res);
typedef void(^OnInputPinSuccessListener)(InputPinEntModel *model);
typedef void(^OnInputPinFailListener)(InputPinFailEnum res);
typedef void(^OnGetDeviceKSNListener)(BOOL statu,NSData *data);


#pragma mark - TerminalManager
typedef void(^OnGetTerminalInfoListener)(int battery,MPTerminalInfoModel *model,NSString *version);
typedef void(^OngetTerminalTimeListener)(NSString *time);
typedef void(^OnOperateListener)(OnOperateStatus res);
typedef void(^OnEncryptionSuccessListener)(NSData* data);
typedef void(^OnEncryptionFailListener)(EncryptionFailEnum res);

#endif /* MPBlueToothManagerBlockDefine_h */
